namespace RemiseANiveau2.Entities.fixtures
{
    public class FactoryVersion
    {
        /// <summary>
        /// Retourne la liste des entités.
        /// </summary>
        /// <returns>Liste de versions</returns>
        public static List<Version> GetVersions()
        {

            string filePath = "..\\RemiseANiveau2.Entities\\fixtures\\Versions.txt";
            var lines = File.ReadAllLines(filePath);
            return lines
                .Select(line => line.Split(';'))
                .Where(parts => parts.Length == 2)
                .Select(parts => new Version(parts[1], parts[0]))
                .ToList();
        }
    }
}
